//
//  DesSmallPhotosCVC.m
//  HappyTrip
//
//  Created by yuxuesong on 15-3-28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "DesSmallPhotosCVC.h"


@implementation DesSmallPhotosCVC

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageView];
        [_imageView release];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _imageView.frame = CGRectMake(0.0f, 0.0f, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
}

- (void)setSmallPhoto_albumObject:(DesSmallPhoto_albumObject *)smallPhoto_albumObject
{
    if (_smallPhoto_albumObject != smallPhoto_albumObject) {
        [_smallPhoto_albumObject release];
        _smallPhoto_albumObject = [smallPhoto_albumObject retain];
    }
    [_imageView setImageWithURL:[NSURL URLWithString:self.smallPhoto_albumObject.photo] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
}

- (void)dealloc
{
    [_imageView release];
    [_smallPhoto_albumObject release];
    [super dealloc];
}


@end
